package base;

import java.util.*;

/**
 *
 */
public class Coffee_brewer extends Product {

    /**
     * Default constructor
     */
    /**
     *the model of the coffee_brewer
     */
    private String model;
    /**
     *the water_supply of the coffee_brewer
     */
    private String water_supply;
    /**
     *the number of the coffee_brewer
     */
    private String number;


    public Coffee_brewer(String initialCode,String initialDescription, double initialPrice,String initialModel,String initialWater_supply,String initialNumber) {
        super(initialCode,initialDescription,initialPrice);
        model = initialModel;
        water_supply = initialWater_supply;
        number = initialNumber;
    }

    public Coffee_brewer(String[] product_param) {
        super(product_param[0],product_param[1], Double.parseDouble(product_param[2]));
        model = product_param[3];
        water_supply = product_param[4];
        number = product_param[5];
    }

    /**
     * @return the model of the coffee
     */
    public String getModel() {

        return model;
    }

    /**
     * @return the water_supply of the coffee
     */
    public String getWaterSupply() {

        return water_supply;
    }

    /**
     * @return the number of the coffee
     */
    public String getNumber() {

        return number;
    }

    /**
     * @author tuxiaobei
     * @return Coffee_brewer detail string
     */
    public String toString() {
        String res = super.toString();
        res += "Model:" + getModel() + '\n';
        res += "Water Supply:" + getWaterSupply() + '\n';
        res += "Number of Cups:" + getNumber() + '\n';
        return res;
    }

}